package com.bella.api.utils;

/**
 * API返回结果状态定义
 *
 * @author alvxi
 *  五位编码  2位系统编号 + 3位错误码
 * 10  公共系统
 * lawson_market  11开头
 */
public enum ApiResponseCode {

  SUCCESS(20000, "成功"),
  parameter_invalid(10001, "参数非法"),
  parameter_is_missing(10002, "缺少参数"),
  invalid_operation(10003, "无效操作"),
  not_data_error(10004, "数据不存在"),
  duplicated_register(10005, "数据重复登录"),
  signature_error(10006, "无效签名"),
  invalid_access_token(10007, "无效token"),
  access_token_expired(10008, "token过期"),
  no_permission_to_access(10009, "无权访问"),
  service_error(10010, "系统异常");
  private Integer code;

  private String message;

  private ApiResponseCode(Integer code, String message) {
    this.code = code;
    this.message = message;
  }

  public Integer getCode() {
    return code;
  }

  public String getMessage() {
    return message;
  }

}
